<?php

namespace App;

use Spatie\Permission\Models\Role as PermissionRole;

use Illuminate\Database\Eloquent\Model;

class Role extends PermissionRole
{
    //获取角色关联的菜单
    public function menus()
    {
        return $this->belongsToMany(Menu::class, 'role_has_menu', 'role_id', 'menu_id');
    }
}
